<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s"  uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户列表</title>
</head>
<body>
	<table cellspacing="0" cellpadding="0" width="500px" align="center"
		border="1">
		<tr>
			<th colspan="5">用户列表</th>
		</tr>
		<tr>
			<td colspan="5"><a href="${pageContext.request.contextPath}/add.jsp"><button>添加</button></a>
				<%-- <form
					action="${pageContext.request.contextPath }/findUserList"
					method="post">
					<input type="text" name="searchName" style="border-color: red" /> <input
						type="submit" value="查询" style="color: red">
				</form> --%></td>
		</tr>
		<tr>
			<th>编号</th>
			<th>用户名</th>
			<th>密码</th>
			<th>姓名</th>
			<th>操作</th>
		</tr>
		<s:iterator value="#session.userList" var="user">
			<tr align="center">
				<td><s:property value="#user.id"/></td>
				<td><s:property value="#user.userName"/></td>
				<td><s:property value="#user.pwd"/></td>
				<td><s:property value="#user.name"/></td>
				<td><a href="update.jsp?id=<s:property value="#user.id"/>&userName=<s:property value="#user.userName"/>&pwd=<s:property value="#user.pwd"/>&name=<s:property value="#user.name"/>"/><button>修改</button></a>
					&nbsp;&nbsp;&nbsp;&nbsp; 
					<a href="deleteUser?id=<s:property value="#user.id"/>"><button>删除</button></a></td>
			</tr>
		</s:iterator>
	</table>
</body>
</html>